//
//  TSHotAreaPresenter.m
//  TaShuo
//
//  Created by N-X on 2018/1/17.
//  Copyright © 2018年 MRNAN. All rights reserved.
//

#import "TSHotAreaPresenter.h"
#import "TSHotAreaModel.h"

@interface TSHotAreaPresenter()
@property (nonatomic ,strong)TSHotAreaModel * model;
@end

@implementation TSHotAreaPresenter

+ (instancetype)instanceWithHotAreaModel:(TSHotAreaModel *)model
{
    TSHotAreaPresenter * presenter = [[TSHotAreaPresenter alloc]init];
    presenter.model = model;
    return presenter;
}

#pragma mark - getter

- (TSHotAreaModel *)model
{
    return self.model;
}

- (NSString *)nameText
{
    return self.model.name;
}

- (NSString *)englishNameText{
    return self.model.english_name;
}

- (NSString *)headpic
{
    return self.model.headpic;
}

- (NSString *)descriptionText
{
    return self.model.description;
}

- (NSArray<TSHotAreaItemPresenter *> *)stores
{
    NSArray * storesArray = self.model.stores;
    NSMutableArray * mStores = [NSMutableArray array];
    for (TSHotAreaItemModel *itemModel in storesArray) {
        TSHotAreaItemPresenter * presenter = [TSHotAreaItemPresenter instanceWithItemModel:itemModel];
        [mStores addObject:presenter];
    }
    return mStores;
}

@end
